//
//  LSZDynamicHomepageCollCell.m
//  JKFuYinProject
//
//  Created by 九酷 on 2018/8/18.
//  Copyright © 2018年 LC. All rights reserved.
//

#import "LSZDynamicHomepageCollCell.h"

@implementation LSZDynamicHomepageCollCell
-(id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        UIView * viewLow = [[UIView alloc]init];
        viewLow.backgroundColor = [UIColor whiteColor];
        [self insertSubview:viewLow atIndex:0];

        self.imageViewCover = [[UIImageView alloc]init];
        [self.imageViewCover.layer setMasksToBounds:YES];
        [viewLow addSubview:self.imageViewCover];

        self.labelTitle = [[UILabel alloc]init];
        self.labelTitle.textAlignment = NSTextAlignmentCenter;
        self.labelTitle.textColor = titleColorLSZ;
        [viewLow addSubview:self.labelTitle];
        [LSZSpecialPackaging setLabelAdaptiveSize:self.labelTitle font:13.5];

        [viewLow mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self).offset(0);
            make.right.equalTo(self).offset(0);
            make.left.equalTo(self).offset(0);
            make.bottom.equalTo(self.mas_bottom).offset(0);
        }];
        [self.imageViewCover mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self).offset(10);
            make.right.equalTo(self).offset(-15);
            make.left.equalTo(self).offset(15);
            make.bottom.equalTo(self.mas_bottom).offset(-35);

        }];
        [self.labelTitle mas_makeConstraints:^(MASConstraintMaker *make) {
         make.top.equalTo(self.imageViewCover.mas_bottom).offset(5);
            make.right.equalTo(self).offset(0);
            make.left.equalTo(self).offset(0);
            make.bottom.equalTo(self.mas_bottom).offset(-5);
        }];
        [self.imageViewCover.layer setCornerRadius:self.imageViewCover.frame.size.height/2];
    }
    return self;
}
@end
